//
// Created by Luhang on 2023/10/11/011.
//
//日志等级类

#ifndef LOGPROJECT_LEVEL_H
#define LOGPROJECT_LEVEL_H

namespace LuLog{
    class LogLevel{
    public:
        enum class level{
            UNKNOWN = 0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };

        static const char *toString(LogLevel::level l){
            switch(l){
                case LogLevel::level::DEBUG:
                    return "DEBUG";
                case LogLevel::level::INFO:
                    return "INFO";
                case LogLevel::level::WARN:
                    return "WARN";
                case LogLevel::level::ERROR:
                    return "ERROR";
                case LogLevel::level::FATAL:
                    return "FATAL";
                case LogLevel::level::OFF:
                    return "OFF";
                default:
                    break;
            }
            return "UNKNOWN";
        }
    };
}

#endif //LOGPROJECT_LEVEL_H